﻿using System.Web.Mvc;

namespace SysController
{
    #region OrdersAreaRegistration
    public class OrdersAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Orders";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Orders_default",
                "Orders/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional },
                new string[1] { "SysController.Order" }
            );
        }
    }
    #endregion

    #region ProductsAreaRegistration
    public class ProductsAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Products";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Products_default",
                "Products/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional } 
            );
        }
    }
    #endregion

    #region AmazonAreaRegistration
    public class AmazonAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Amazon";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Amazon_default",
                "Amazon/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional },
                 new string[1] { "SysController.Amazon" }
            );
        }
    } 
    #endregion
}
